<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<title>注册</title>
<style type="text/css">
  table, td {
    border-collapse: collapse;
    border: 0
  }
  table {
    margin: auto;
  }
</style>
</head>
<body>
  <div style="text-align: center;">
    <form action="${pageContext.request.contextPath}/register" method="post">
      <table>
        <tr>
          <td>用户名称</td>
          <td><input type="text" name="user-name" placeholder="最多10个字符"></td>
        </tr>
        <tr>
          <td>密码</td>
          <td><input type="password" name="password" placeholder="最多10个字符"></td>
        </tr>
        <tr><td><input type="button" value="注册" onclick="submit()"></td></tr>
      </table>
    </form>
    <c:if test="${error!=null}">
      <span class="error">${requestScope.error}</span>
    </c:if>
  </div>
</body>
</html>
